-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/gitrepository #52
base: master
Are you sure you want to change the base?
Conversation
Hi, |
Done |
extra_env = author_info.get_author_env() if author_info else None | ||
def _commit(self, msg, args=[], author_info=None, committer_info=None): | ||
extra_env = author_info.get_author_env() if author_info else {} | ||
if committer_info: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we change from None to {} here we need to fixup _build_env to return None for extra_env being {} or None
I spotted one other change that might introduce problems since __build_env would change return type and that gets passed to Popen and Popen's default type for "do nothing" is None not {} (see _execute_child in subprocess.py). I don't think that matter but it might be worth checking. |
Well spotted :) It won't make any difference as the current env is copied in this case. An empty dict is already used in some places, e.g. add_files(). However, I now added one more commit so that extra_env={} will be handled as expected. |
fba3864
to
41faf1d
Compare
437b9e7
to
ea3952f
Compare
For setting the committer name/email/date - similarly to author_info. Signed-off-by: Markus Lehtonen <[email protected]>
For setting the committer name/email/date - similarly to author_info. Signed-off-by: Markus Lehtonen <[email protected]>
Signed-off-by: Markus Lehtonen <[email protected]>
No need to build 'env' arg for popen when extra_env is empty. In some methods an empty dict is used to indicate "no extra env". This commit does not affect the output/outcome of GitRepository operations, but, just makes the code a tiny bit sleeker. Signed-off-by: Markus Lehtonen <[email protected]>
ea3952f
to
831aeaf
Compare
No description provided.